package com.yenlien.traceyun.business.dao;

import com.yenlien.traceyun.business.entity.CodeInfo;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;

import java.util.List;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-07-24
 * @description:
 **/
public interface CodeInfoDao extends BaseJpaDao<CodeInfo> {

    /**
     * 根据code信息找找
     *
     * @param code
     * @return
     */
    public List<CodeInfo> findByCode(String code);

    /**
     * 根据批次号
     *
     * @param batchNo
     * @return
     */
    public CodeInfo findByBatchNo(String batchNo);


    /**
     * 数量
     *
     * @param batchNo
     * @param code
     * @return
     */
    public int countByBatchNoAndCode(String batchNo, String code);
}
